home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Programmer Disk
/
The Programmer Disk (Microforum).iso
/
xpro
/
vc
/
pro3
/
borl2zip.c1
< prev
next >
Wrap
Text File
|
1993-05-12
|
3KB
|
96 lines
===========================================================================
BBS: The Abacus * HST/DS * Potterville MI
Date: 05-08-93 (02:28) Number: 33
From: RICARDO GUIMARAES Refer#: NONE
To: DAVE GOMBOC Recvd: NO
Subj: BORL2ZIP.C - 1 of 2 Conf: (36) C Language
---------------------------------------------------------------------------
DG> 4) Actually, a comment: I really hate having to put in each of 15 disks
DG> every time I install something! I first installed just BC and BCC for
DG> dos, then deleted (other) stuff and found room for TPROF, and later
DG> for TASM. I'd like to see this change in the next release.
Maybe this can help :)
/* BORL2ZIP.C
Program to join several split (*.CA?) files in the Borland C++
disks into one ZIP file. Just get the right disks as indicated
in FILELIST.DOC and keep feeding the program disks until the last
one, then select [E]nd
Copyright 1993 by Ricardo Guimaraes.
NetMail: 1:107/570
Internet: guimar@icarus.montclair.edu
This program is freeware.
*/
#include <string.h>
#include <ctype.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#define BUFSIZE 32*1024
int main( int argc, char **argv )
{
int GetMore(void);
int QuitNow(void);
int done,counter;
int size;
char iname[65], oname[65];
char *buffer;
char str[18];
FILE *Source;
FILE *NewFile;
if ( argc!=3 ){
printf("\n\t*** BORL2ZIP - Copyright 1993 by "
"Ricardo Guimaraes ***\n");
printf("\nUsage:\tBORL2ZIP SourceFile DestFile\n");
printf("\tGive the Source and Destination filenames ");
printf("without the extension.\n");
exit(1);
}
strcpy(oname,argv[2]);
strcat(oname,".ZIP");
NewFile = fopen(oname,"wb");
if (!NewFile){
printf("\nError creating %s\n",oname);
exit(1);
}
buffer = malloc(BUFSIZE);
if ( buffer==0 ){
printf("Not enough memory!\n");
exit(1);
}
counter = 1;
strcpy(iname,argv[1]);
strcat(iname,".CA1");
done=0;
printf("\n");
while (!done){
printf("Getting file %s... \n",iname);
while ( (Source = fopen(iname,"rb")) == NULL ){
if ( QuitNow() ){
done=1;
break;
}
}
if (done) continue;
fseek(Source,5,0); /* skip over header */
* SLMR 2.1a * puts("grila!");
--- WM v2.07/91-0165
* Origin: TrailBlaZer BBS HST * 201-742-1860 Paterson, NJ (1:107/48)
SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1
SEEN-BY: 153/752 154/40 77 157/2 159/100 125 575 950 203/23 209/209 261/1023
SEEN-BY: 280/1 390/1 396/1 5 15 2270/1 2440/5 3603/20